import { LoaderHelp } from "../../../../common/display/LoaderHelp";
import { ResFileConst } from "../../../resource/ResFileConst";
import { GlobalClass } from "../../../../../com/mui/core/GlobalClass";
import { ImagesConst } from "../../../resource/ImagesConst";
//class ArenaCrossGroupMyServer
    
    export  class ArenaCrossGroupMyServer /* flash.display.Sprite */
    {
        constructor()
        {
            
            this.init();
            return;
        }

        /* internal  */init(): void
        {
            this._bmpBg = new Object /* flash.display.Bitmap */();
            this.addChild(this._bmpBg);
            this._bmpMyServer = new Object /* flash.display.Bitmap */();
            this._bmpMyServer.x = 17;
            this._bmpMyServer.y = 10;
            this.addChild(this._bmpMyServer);
            LoaderHelp.addResCallBack(ResFileConst.ArenaCrossGroupMine, this.onResCompl);
            return;
        }

        /* internal  */onResCompl(): void
        {
            this._isResCompl = true;
            this.updateView();
            return;
        }

        public set selected(arg1: Boolean)
        {
            this._isSelect = arg1;
            this.updateView();
            return;
        }

        /* internal  */updateView(): void
        {
            if (this._isResCompl) 
            {
                this._bmpMyServer.bitmapData = GlobalClass.getBitmapData(ImagesConst.ArenaCrossGroupMineMyServer);
                if (this._isSelect) 
                {
                    this._bmpBg.bitmapData = GlobalClass.getBitmapData(ImagesConst.ArenaCrossGroupMineSelect);
                }
                else 
                {
                    this._bmpBg.bitmapData = GlobalClass.getBitmapData(ImagesConst.ArenaCrossGroupMineUp);
                }
            }
            return;
        }

        /* internal */ /* var */_isSelect: Boolean=false;

        /* internal */ /* var */_isResCompl: Boolean=false;

        /* internal */ /* var */_bmpBg: Object /* flash.display.Bitmap */;

        /* internal */ /* var */_bmpMyServer: Object /* flash.display.Bitmap */;
    }
